#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
const int N = 1e5 + 10;
int n, p;
int a[N], b[N];
double sum, l, r = 1e10;

bool check(double x) {
	double q = p * x;
	double s = 0;
	for (int i = 1; i <= n; i++) {
		if (a[i] * x <= b[i]) continue;
		s += a[i] * x - b[i];
	}
	return s <= q;
}

int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	cin >> n >> p;
	for (int i = 1; i <= n; i++) {
		cin >> a[i] >> b[i];
		sum += a[i];
	}
	if (sum <= p) {
		cout << -1.0000000000 << endl;
		return 0;
	}
	while (r - l > 1e-6) {
		double mid = (l + r) / 2;
		if (check(mid)) l = mid;
		else r = mid;
	}
	cout << l << endl;
	return 0;
}
